<?php
/**
 * Created by PhpStorm.
 * User: admin
 * Date: 2018/11/21
 * Time: 18:55
 * 图片验证码
 */

//启用SESSION
session_start();

require_once('common/captcha.class.php');   //加载图片验证码类文件

//实例化一个验证码
$captcha=new Captcha(60,20,4);

$captcha->showImg();

//存储SESSION变量
$_SESSION['captcha']=$captcha->getCaptcha();
